/**
 * Form used for search Consolidators
 */
Ext.define('Sisconsolid.view.consolidator.search.Form', {
    extend: 'Ext.form.Panel',
    alias: 'widget.consolidator.search.form',
    requires: [
        'Ext.form.FieldSet',
        'Ext.form.field.Text',
		'Sisconsolid.store.Families',
    ],
    bodyPadding: 5,
    initComponent: function() {
        var me = this;
        Ext.applyIf(me, {
            layout: {                        
				type: 'vbox',
				align: 'center'
     		},
		    bodyPadding: 10,
            fieldDefaults: {
				labelAlign: 'right',
				labelWidth: 140
            },
            items: [
                {
                    xtype: 'fieldset',
					title: translations.consolidatorFilters,
					items: [
						{
							xtype: 'textfield',
							name: 'firstName',
							fieldLabel: translations.firstName,
							width: 350
						},
						{
							xtype: 'textfield',
							name: 'lastName',
							fieldLabel: translations.lastName,
							width: 350
						},
						{
							xtype: 'textfield',
							name: 'document',
							fieldLabel: translations.document,
							maxLength: 100,
							width: 240
						},
						{
							xtype: 'combobox',
							name: 'family',
							fieldLabel: translations.family,
							store: {
								type: 'family'
							},
							valueField: 'key',									
							displayField: 'value',
							editable: false,
							width: 320
						}
                    ]
                }
            ]
        });
        me.callParent( arguments );
    }
});